// This program demonstrates the STL stack

#include <vector>
#include <list>
#include <stack>
#include <iostream>
using namespace std;

int main()
{
	stack<int, vector<int>> iStack;

	for(int i = 2; i < 8; i +=2)
	{
		cout << "Pushing " << i << endl;
		iStack.push(i);
	}

	cout << "The size of the stack is ";
	cout << iStack.size() << endl;

	while(!iStack.empty())
	{
		cout << "Popping " << iStack.top() << endl;
		iStack.pop();
	}

	return 0;
}
